package com.utra.hellshan.upload.ThemeTools;

import android.app.Activity;
import android.content.Context;
import android.view.WindowManager;

public class ThemeTools {

    private static boolean actionBarShowen = true;
    private static boolean systemBarShowen = true;


    //用于设置为全屏activity ， 需要时直接调用即可。
    public static void setActionBar(Context context)
    {

    }


    //隐藏系统任务栏
    public static void setSystemBar(Activity context)
    {
        if(!systemBarShowen)
        {
            context.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        }
        else
        {
            context.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        }


        systemBarShowen = !systemBarShowen;

    }

}
